<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<h3>js中的对象</h3>
		<script type="text/javascript">
			var car = new Object();
			//动态增加属性，Java为静态语言，做不到
			console.log(car);
			
			car.name = "红旗1949";
			car.type = "H999";
			car.color = "红";
			console.log(car);
			//
			var car1 = {name:'汗血宝马',type:'神一品',color:'红'};//创建空对象
			console.log(car1);
			car1.price = 99999;
			console.log(car1);
			
		</script>
	</body>
</html>
